package com.factory.code.service.model;

import com.factory.code.common.VelocityTemplateText;
import com.factory.code.common.helper.StringHelper;
import lombok.Data;


@Data
public class CodeTableColumnModel {

    @VelocityTemplateText("数据库 字段名   n_id s_user_name")
    private String columnName;


    @VelocityTemplateText("字段名  id userName createTime`")
    private String attrName;

    public String getAttrName() {
        return StringHelper.upperFirstLetter(attrName);
    }

    public void setAttrName(String attrName) {
        this.attrName = attrName;
    }

    @VelocityTemplateText("字段名  Id UserName CreateTime`")
    private String attrNameLF;

    public String getAttrNameLF() {
        attrNameLF = StringHelper.lowerFirstLetter(attrName);
        return attrNameLF;
    }

    @VelocityTemplateText("数据库类型")
    private String attrType;

    @VelocityTemplateText("是否自增")
    private Boolean isIdentity;

    @VelocityTemplateText("是否主键")
    private Boolean isPk;

    @VelocityTemplateText("字段注释")
    private String comments;

    @VelocityTemplateText("字段长度")
    private Integer maxLength;

    @VelocityTemplateText("小数位长度")
    private Integer scale;


}
